package com.sw.bbs.board.service;

import com.github.pagehelper.PageInfo;
import com.sw.bbs.board.pojo.Post;
import com.sw.bbs.board.vo.request.post.InsertPostRequest;
import com.sw.bbs.board.vo.request.post.QueryPostRequest;
import com.sw.bbs.board.vo.request.post.UpdatePostRequest;
import com.sw.bbs.board.vo.response.post.PostDetailResponse;
import com.sw.bbs.board.vo.response.post.PostListResponse;
import io.swagger.models.auth.In;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


/**
 * @Desc: No Desc
 * @Author: wusonghe
 * @Date: 2019/3/4 16:06
 */
public interface PostService {

    /** 查询列表
     *
     * @param request
     * @return
     */
    PageInfo<PostListResponse> queryPostList(QueryPostRequest request);

    /**
     * 查询详情
     * @param postId
     * @return
     */
    PostDetailResponse queryPostDetail(Integer postId);

    /**
     * 插入帖子
     * @param insertboardPostRequest
     * @return
     */
    Integer insertPost(InsertPostRequest insertboardPostRequest,
                       HttpServletRequest httpServletRequest) throws Exception;

    /**
     * 更新帖子
     * @param updatePostRequest
     * @return
     */
    Integer updatePost(UpdatePostRequest updatePostRequest) throws Exception;
    /**
     * 删除帖子
     * @param postId
     * @return
     */
    Integer deletePost(Integer postId) throws Exception;

    /**
     * 热门帖子
     * @return
     */
    List<PostListResponse> queryHotPostList();



}
